﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Pout_Porri.Objects.Interface;
using Pout_Porri.Utils;

namespace Pout_Porri.Objects
{
    public enum EnemyStates
    {
        walking,
        running,
        runningtopspeed,
        crouching,
        stand,
        jumping,
        falling,
        lookingup,
        climbing,
        dying,
        popup
    }

    abstract class Enemy : PhysicsGameEntity

    {
        public EnemyStates currentState;

        private int maxJumps = 0;

        protected int MaxJumps
        {
            get { return maxJumps; }
            set { maxJumps = value; }
        }

        private int contJumps = 0;

        private float jumpHeight = 0;

        protected float JumpHeight
        {
            get { return jumpHeight; }
            set { jumpHeight = value; }
        }

        public Enemy(Texture2D image, Vector2 position, Vector2 velocity)
            : base(image, position, velocity, true)
        {
            DefaultVelocityX = 0;
            MaxJumps = 0;
            this.currentState = EnemyStates.stand;
            this.configAnimations();
            useKeepInWorld = false;
        }

        public virtual void configAnimations()
        {

            
        }

        public void setGrounded(bool b)
        {
            base.setGrounded(b);
            if (b == true)
            {
                contJumps = 0; // reset the jumps
            }
        }

        //public override void update(GameTime gameTime)
        //{
        //    base.update(gameTime);
        //}
    }
}
